import unittest
from api.py02_IhrmCRUDApi import IhrmCrud
from common.py01_IhrmAssertUtil import common_assert


class IhrmCrudTest(unittest.TestCase):

    def testInsert(self):
        header = {"Content-Type": "application/json", "Authorization": "Bearer 22eeb079-8a19-444d-96d9-d81225a3cd90"}
        json_data = {"username": "ai",
                     "mobile": "18312341234",
                     "form0fEmployment": 1,
                     "departmentName": "测试0002",
                     "departmentID": "234",
                     "correctionTime": "2025-07-30T16:00:00.000Z"}
        resp=IhrmCrud.insert_emp(header, json_data)

        #断言
        common_assert(self,resp,200,True,10000,"操作成功")
